/*
 * Copyright (C) 2010, JDevelopers (jdevelopers@my-pages.org) 
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License. 
 * You may obtain a copy of the License at 
 * 
 *    http://www.apache.org/licenses/LICENSE-2.0 
 * 
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the License is distributed on an "AS IS" BASIS, 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
 * See the License for the specific language governing permissions and 
 * limitations under the License. 
 */
/**
 * 
 */
package org.jdevelopers.xarf;

import java.io.Serializable;

/**
 * Object, which contains the name of a header in a MimeMessage and the associated content.
 * 
 * @author Marcel Hartwig
 * @version 0.2
 * @since JXarfValidator 0.1
 */
public abstract class XarfReportAttachmentMailHeader implements Serializable {

    
	/**
     * ID fpr serializing the object. 
     */
    private static final long serialVersionUID = -8240074602151344995L;
    
    private String headerName;
	private String headerValue;
	
	/**
	 * Constructor for creating an instance of a XarfReportAttachmentMailHeader.
	 */
	public XarfReportAttachmentMailHeader() {
	}
	
	/**
	 * Returns the header name.
	 * 
	 * @return the name of the header.
	 */
	public String getHeaderName() {
		return headerName;
	}
	
	/**
	 * Sets the header name.
	 * 
	 * @param headerName the header name to set.
	 */
	protected void setHeaderName(String headerName) {
		this.headerName = headerName;
	}
	
	/**
	 * Returns the content of the header.
	 * 
	 * @return the header content.
	 */
	public String getHeaderValue() {
		return headerValue;
	}
	
	/**
	 * Sets the header content.
	 * 
	 * @param headerContent the header content to set.
	 */
	protected void setHeaderValue(String headerValue) {
		this.headerValue = headerValue;
	}
	
	/**
	 * Provides the String representation of the <code>XarfReportAttachmentMailHeader</code>.
	 */
	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append(headerName).append(": ").append(headerValue);
		return sb.toString();
	}
	
}
